package in.srain.cube.request;

public interface IRequestProxy<OriginDataType> {

    <T> T requestSync(IRequest<T, OriginDataType> request) throws Throwable;

    <T> void sendRequest(IRequest<T, OriginDataType> request);

    <T> void prepareRequest(IRequest<T, OriginDataType> request);

    <T> void onRequestFail(IRequest<T, OriginDataType> request, Object requestTag, FailData failData);

    <T> T processResponse(IRequest<T, OriginDataType> cubeRequest, int responseCode, String responseString, long rt) throws Exception;
}
